package blhorse.TreadQue;

import java.util.concurrent.ArrayBlockingQueue;

public class ThreadQue_Demo {
    //使用阻塞队列模拟线程通信 ： 厨师做面条 + 吃面条
    public static void main(String[] args) {
        //怎么实现
        //1.创建一个阻塞队列
        ArrayBlockingQueue<String> queue = new ArrayBlockingQueue<>(3);

        Cook cook = new Cook(queue);
        Eat eat = new Eat(queue);
        cook.start();
        eat.start();
    }
}
